How can I implement a workaround for a rank function in MySQL based on multiple columns

visit shbcf.ru